//Lobby.h
#ifndef Lobby_H
#define Lobby_H

#include "list.h"
#include "synch.h"
#include <stdarg.h>

class Cineplex;

class Lobby
{
	public:
		Lobby(char* name);
		~Lobby();
		void SendMessage(char* name, int argc, ...);
		void SendMessage(char* name, IterList* args);
		void Scheduler();
		void Start();
		
		void IdleAction();
		void StartReleasing();
		void AskCount();
		void WaitCount();
		void WaitForTech();
		
		MsgList* msgList;
		void* replyTo;
		Lock* msgLock;
		char* myName;
		Condition* sleepCon;
		Cineplex* cinema;
		char* state;
		int repliesWaiting, msgInt;
		
		IterList* custInLobby;
		IterList* custToAsk;
};


#endif
